//
//  Tools.h
//  POS
//
//  Created by 廉英雷 on 15/9/24.
//  Copyright © 2015年 廉英雷. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Tools : NSObject

+(instancetype)shareTools;

-(void)alert:(NSString *)title :(NSString *)text;


/**加载页*/
-(void)startLoadingWithText:(NSString *)text;
-(void)stopLoading;

/** 显示提示 */
- (void)showAlertWithText:(NSString *)text;
/**获取系统版本*/
+(NSString *)getVersion;

/**当前设备编号*/
+(NSString *)getUUID;

/**字符串下划线*/
+(NSMutableAttributedString *)underLineString:(NSString *)stirng;
/**mobil是否是手机号*/
+(BOOL)stringIsMobile:(NSString *)mobil;
/**text是否是邮箱格式*/
+(BOOL)isEmail:(NSString*)text;
/**是否是有银行卡号*/
+(BOOL)isAccountNo:(NSString *)text;


+(BOOL)isPassword:(NSString*)text;//密码由6--16位字母和数字组成


/**各种请求头*/
+(NSDictionary *)checkHttpHeader;
+(NSDictionary *)vipHttpHeader;
+(NSDictionary *)LoginHttpHeader;


+ (char *)UTF8_To_GB2312:(NSString*)utf8string;

-(void)showHUD:(NSString *)title afterTime:(double)seconds failStr:(NSString *)str;

//隐藏加载
- (void)hideHUD;

-(void)showProgressWithStatus:(NSString *)status;
-(void)hideProgressAfterDelaysInSeconds:(float)seconds;
-(void)hideProgressAfterDelaysInSeconds:(float)seconds withCompletion:(void (^)())completion;

- (void)showHUDDelayHid:(NSString *)title;

//显示加载
- (void)showHUD:(NSString *)title;

//隐藏加载显示加载完成提示
- (void)hideHUDWithTitle:(NSString *)title;

//显示提示
- (void)showTipView:(NSString *)tip;
@end
